package com.csyf.manager.controller.agent;

import com.csyf.manager.entity.SysMerchant;
import com.csyf.manager.entity.SysPayment;
import com.csyf.manager.entity.SysUser;
import com.csyf.manager.service.PayMentBiz;
import com.csyf.manager.service.SysMerchBiz;
import com.csyf.manager.utils.page.JqGridVo;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: casper
 * @Description: 代理商代付Controller
 * @Date: Created in 2018/11/30 11:21
 */
@Controller
@RequestMapping("/agentPayment")
public class AgentPaymentController {

    @Autowired
    private PayMentBiz payMentService;

    @Autowired
    private SysMerchBiz sysMerchBiz;

    /**
     * 代理商代付列表
     * @param vo
     * @param page
     * @param rows
     * @return
     */
    @ResponseBody
    @PostMapping(value = "list")
    public JqGridVo list(SysPayment vo, Integer page, Integer rows) {

        //获取登录的代理商信息
        SysUser sysUser = (SysUser) SecurityUtils.getSubject().getPrincipal();

        return payMentService.queryOrderByUserId(vo, page, rows);
    }



}
